To boost visual experience of a user, more and more display devices can achieve 3D (Three dimensions) display so as to make pictures projected to eyes of a user present 3D display effect.
Generally, a display device to achieve 3D display effect includes a grating and a pixel array. Each pixel in a pixel array includes three sub-pixels, and each column of sub-pixels is usually composed of sub-pixels with three colors including red sub-pixels, green sub-pixels or blue sub-pixels that are aligned. Quantities of sub-pixels included in each column are the same and the lateral height of sub-pixels is consistent. The grating includes light-blocking areas and transparent areas that are arranged alternately and the light-blocking areas partially blocking the pixel array.
Upon an image being displayed in a display device above, a brightness value of each sub-pixel in a pixel array is determined first according to an image to be displayed; and then, the image is displayed according to the brightness value of each sub-pixel in a pixel array and the image to be displayed is divided into a left view and a right view via the grating.